import request from '@/utils/request'

// 获取员工列表
export const getEmployeeListAPI = (params) => request.get('/sys/user', { params })

// 导出员工excel
export const exportEmployeeAPI = () => request.get('/sys/user/export', { responseType: 'blob' })

// 下载员工导入模板
export const exportTemplateAPI = () => request.get('/sys/user/import/template', { responseType: 'blob' })

//  上传员工excel
export const uploadExcelAPI = (data) => request.post('/sys/user/import', data, {
  headers: {
    'Content-Type': 'multipart/form-data' // 正常请求的是jsonapplication/json格式
  }
})

// 删除员工信息接口

export const delEmployeeAPI = (id) => request.delete(`/sys/user/${id}`)

// 新增员工接口
export const addEmployeeAPI = (data) => request.post('/sys/user', data)

// 获取员工详情
export const getEmployeeDetailAPI = (id) => request.get(`/sys/user/${id}`)

// 编辑员工接口
export const updataEmployeeAPI = (data) => request.put(`/sys/user/${data.id}`, data)

// 删除群发消息
// export const delSend
